#pragma once

#include "bass.h"
#include "stdlib.h"

enum STREAM_TYPE{OTHERFILES,MOD};

typedef struct tagStreamNode
{
	STREAM_TYPE idType;
	char* sID;
	DWORD hStream;
}STREAM_NODE, *PSTREAM_NODE;

class CSound
{
private:
	char* m_szFile;
	HWND m_hWnd;
	int m_Device;
	DWORD m_freg;
	DWORD m_flags;

	PSTREAM_NODE m_streams;
	int m_nStreamCount;
public:
	//constructors
	CSound();

	//Destructor
	~CSound();

	//Init
	int Init(HWND);

	//Them file vao list
	int AddFile(STREAM_TYPE type, const char* sID,const char* szFile, DWORD flags);

	//Remove file from list
	void RemoveFile(char* id);
	void RemoveAll();
	int  Play(char* id,bool bRestart);
	void Pause(char* id);
	void Stop(char* id);
	void PauseAll();
	void StopAll();
	void ResumeAll();
	void SetGlobalVolume(int nVol);
	void SetItemVolume(char* id,int nVal);
};